#ifndef __SESSION__H
#define __SESSION__H

#include "Loop.h"
#include <uv.h>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include "client.h"

using std::vector;

class SessionManger
{
	public:
		static SessionManger& GetInstance();
		int CreatSessionID();
		int AddSession(std::shared_ptr<Client>);
		bool Deliver(int sid, char msg_type, string data);
        void WriteTo(int sid, stringstream& ss);


	private:
		vector<std::shared_ptr<Client> > mVecse;
		SessionManger();
		~SessionManger();

};

#endif
